display_cacheinfo(c);
- if (cpuid_eax(0x80000000) >= 0x80000008) {
+ if (c->extended_cpuid_level >= 0x80000008) {
c->x86_max_cores = (cpuid_ecx(0x80000008) & 0xff) + 1;
}
- if (cpuid_eax(0x80000000) >= 0x80000007) {
+ if (c->extended_cpuid_level >= 0x80000007) {
c->x86_power = cpuid_edx(0x80000007);
if (c->x86_power & (1<<8)) {
set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability);
unsigned int *v;
char *p, *q;
- if (cpuid_eax(0x80000000) < 0x80000004)
+ if (c->extended_cpuid_level < 0x80000004)
return 0;
v = (unsigned int *) c->x86_model_id;
void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
{
- unsigned int n, dummy, ecx, edx, l2size;
+ unsigned int dummy, ecx, edx, l2size;
- n = cpuid_eax(0x80000000);
-
- if (n >= 0x80000005) {
+ if (c->extended_cpuid_level >= 0x80000005) {
cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
if (opt_cpu_info)
printk("CPU: L1 I cache %dK (%d bytes/line),"
c->x86_cache_size=(ecx>>24)+(edx>>24);
}
- if (n < 0x80000006) /* Some chips just has a large L1. */
+ if (c->extended_cpuid_level < 0x80000006) /* Some chips just has a large L1. */
return;
ecx = cpuid_ecx(0x80000006);
static void __cpuinit generic_identify(struct cpuinfo_x86 *c)
{
- u32 tfms, xlvl, capability, excap, ebx;
+ u32 tfms, capability, excap, ebx;
/* Get vendor name */
cpuid(0x00000000, &c->cpuid_level,
c->x86_clflush_size = ((ebx >> 8) & 0xff) * 8;
/* AMD-defined flags: level 0x80000001 */
- xlvl = cpuid_eax(0x80000000);
- if ( (xlvl & 0xffff0000) == 0x80000000 ) {
- if ( xlvl >= 0x80000001 ) {
+ c->extended_cpuid_level = cpuid_eax(0x80000000);
+ if ( (c->extended_cpuid_level & 0xffff0000) == 0x80000000 ) {
+ if ( c->extended_cpuid_level >= 0x80000001 ) {
c->x86_capability[1] = cpuid_edx(0x80000001);
c->x86_capability[6] = cpuid_ecx(0x80000001);
}
- if ( xlvl >= 0x80000004 )
+ if ( c->extended_cpuid_level >= 0x80000004 )
get_model_name(c); /* Default name */
- if ( xlvl >= 0x80000008 )
+ if ( c->extended_cpuid_level >= 0x80000008 )
paddr_bits = cpuid_eax(0x80000008) & 0xff;
}
static void __init get_ibs_caps(void)
{
- unsigned int max_level;
-
if (!boot_cpu_has(X86_FEATURE_IBS))
return;
/* check IBS cpuid feature flags */
- max_level = cpuid_eax(0x80000000);
- if (max_level >= IBS_CPUID_FEATURES)
+ if (current_cpu_data.extended_cpuid_level >= IBS_CPUID_FEATURES)
ibs_caps = cpuid_eax(IBS_CPUID_FEATURES);
if (!(ibs_caps & IBS_CAPS_AVAIL))
/* cpuid flags not valid */